<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GDBusMethodInvocation</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GIO 参考手册">
<link rel="up" href="gdbus-lowlevel.html" title="Lowlevel D-Bus Support">
<link rel="prev" href="gio-GDBusConnection.html" title="GDBusConnection">
<link rel="next" href="gio-GDBusServer.html" title="GDBusServer">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gio-GDBusConnection.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gdbus-lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO 参考手册</th>
<td><a accesskey="n" href="gio-GDBusServer.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gio-GDBusMethodInvocation.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gio-GDBusMethodInvocation.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gio-GDBusMethodInvocation"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gio-GDBusMethodInvocation.top_of_page"></a>GDBusMethodInvocation</span></h2>
<p>GDBusMethodInvocation — Object for handling remote calls</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gio-GDBusMethodInvocation.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gio/gio.h&gt;

                    <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation">GDBusMethodInvocation</a>;
const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-get-sender" title="g_dbus_method_invocation_get_sender ()">g_dbus_method_invocation_get_sender</a> (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);
const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-get-object-path" title="g_dbus_method_invocation_get_object_path ()">g_dbus_method_invocation_get_object_path</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);
const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-get-interface-name" title="g_dbus_method_invocation_get_interface_name ()">g_dbus_method_invocation_get_interface_name</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);
const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-get-method-name" title="g_dbus_method_invocation_get_method_name ()">g_dbus_method_invocation_get_method_name</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);
const <a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusMethodInfo" title="GDBusMethodInfo"><span class="returnvalue">GDBusMethodInfo</span></a> * <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-get-method-info" title="g_dbus_method_invocation_get_method_info ()">g_dbus_method_invocation_get_method_info</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);
<a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-get-connection" title="g_dbus_method_invocation_get_connection ()">g_dbus_method_invocation_get_connection</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);
<a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *      <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-get-message" title="g_dbus_method_invocation_get_message ()">g_dbus_method_invocation_get_message</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *          <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-get-parameters" title="g_dbus_method_invocation_get_parameters ()">g_dbus_method_invocation_get_parameters</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-get-user-data" title="g_dbus_method_invocation_get_user_data ()">g_dbus_method_invocation_get_user_data</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-return-value" title="g_dbus_method_invocation_return_value ()">g_dbus_method_invocation_return_value</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-return-error" title="g_dbus_method_invocation_return_error ()">g_dbus_method_invocation_return_error</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> code</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-return-error-valist" title="g_dbus_method_invocation_return_error_valist ()">g_dbus_method_invocation_return_error_valist</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> code</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-return-error-literal" title="g_dbus_method_invocation_return_error_literal ()">g_dbus_method_invocation_return_error_literal</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> code</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *message</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-return-gerror" title="g_dbus_method_invocation_return_gerror ()">g_dbus_method_invocation_return_gerror</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-return-dbus-error" title="g_dbus_method_invocation_return_dbus_error ()">g_dbus_method_invocation_return_dbus_error</a>
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *error_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *error_message</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gio-GDBusMethodInvocation.description"></a><h2>Description</h2>
<p>
Instances of the <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> class are used when
handling D-Bus method calls. It provides a way to asynchronously
return results and errors.
</p>
<p>
The normal way to obtain a <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> object is to receive
it as an argument to the <code class="function">handle_method_call()</code> function in a
<a class="link" href="gio-GDBusConnection.html#GDBusInterfaceVTable" title="GDBusInterfaceVTable"><span class="type">GDBusInterfaceVTable</span></a> that was passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>.
</p>
</div>
<div class="refsect1">
<a name="gio-GDBusMethodInvocation.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GDBusMethodInvocation"></a><h3>GDBusMethodInvocation</h3>
<pre class="programlisting">typedef struct _GDBusMethodInvocation GDBusMethodInvocation;</pre>
<p>
The <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> structure contains only private data and
should only be accessed using the provided API.
</p>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-get-sender"></a><h3>g_dbus_method_invocation_get_sender ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       g_dbus_method_invocation_get_sender (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);</pre>
<p>
Gets the bus name that invoked the method.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A string. Do not free, it is owned by <em class="parameter"><code>invocation</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-get-object-path"></a><h3>g_dbus_method_invocation_get_object_path ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       g_dbus_method_invocation_get_object_path
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);</pre>
<p>
Gets the object path the method was invoked on.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A string. Do not free, it is owned by <em class="parameter"><code>invocation</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-get-interface-name"></a><h3>g_dbus_method_invocation_get_interface_name ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       g_dbus_method_invocation_get_interface_name
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);</pre>
<p>
Gets the name of the D-Bus interface the method was invoked on.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A string. Do not free, it is owned by <em class="parameter"><code>invocation</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-get-method-name"></a><h3>g_dbus_method_invocation_get_method_name ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       g_dbus_method_invocation_get_method_name
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);</pre>
<p>
Gets the name of the method that was invoked.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A string. Do not free, it is owned by <em class="parameter"><code>invocation</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-get-method-info"></a><h3>g_dbus_method_invocation_get_method_info ()</h3>
<pre class="programlisting">const <a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusMethodInfo" title="GDBusMethodInfo"><span class="returnvalue">GDBusMethodInfo</span></a> * g_dbus_method_invocation_get_method_info
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);</pre>
<p>
Gets information about the method call, if any.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gio-D-Bus-Introspection-Data.html#GDBusMethodInfo" title="GDBusMethodInfo"><span class="type">GDBusMethodInfo</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Do not free, it is owned by <em class="parameter"><code>invocation</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-get-connection"></a><h3>g_dbus_method_invocation_get_connection ()</h3>
<pre class="programlisting"><a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="returnvalue">GDBusConnection</span></a> *   g_dbus_method_invocation_get_connection
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);</pre>
<p>
Gets the <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a> the method was invoked on.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gio-GDBusConnection.html#GDBusConnection" title="GDBusConnection"><span class="type">GDBusConnection</span></a>. Do not free, it is owned by <em class="parameter"><code>invocation</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-get-message"></a><h3>g_dbus_method_invocation_get_message ()</h3>
<pre class="programlisting"><a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="returnvalue">GDBusMessage</span></a> *      g_dbus_method_invocation_get_message
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);</pre>
<p>
Gets the <a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a> for the method invocation. This is useful if
you need to use low-level protocol features, such as UNIX file
descriptor passing, that cannot be properly expressed in the
<a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> API.
</p>
<p>
See <a class="xref" href="gio-GDBusConnection.html#gdbus-server" title="Example 2. D-Bus server example">Example 2, “D-Bus server example”</a> and <a class="xref" href="gio-GDBusConnection.html#gdbus-unix-fd-client" title="Example 4. D-Bus UNIX File Descriptor example">Example 4, “D-Bus UNIX File Descriptor example”</a> for an example of how to use this
low-level API to send and receive UNIX file descriptors.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="gio-GDBusMessage.html#GDBusMessage" title="GDBusMessage"><span class="type">GDBusMessage</span></a>. Do not free, it is owned by <em class="parameter"><code>invocation</code></em>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-get-parameters"></a><h3>g_dbus_method_invocation_get_parameters ()</h3>
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *          g_dbus_method_invocation_get_parameters
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);</pre>
<p>
Gets the parameters of the method invocation.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>. Do not free, it is owned by <em class="parameter"><code>invocation</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-get-user-data"></a><h3>g_dbus_method_invocation_get_user_data ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            g_dbus_method_invocation_get_user_data
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);</pre>
<p>
Gets the <em class="parameter"><code>user_data</code></em> <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> passed to <a class="link" href="gio-GDBusConnection.html#g-dbus-connection-register-object" title="g_dbus_connection_register_object ()"><code class="function">g_dbus_connection_register_object()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-return-value"></a><h3>g_dbus_method_invocation_return_value ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_method_invocation_return_value
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameters</code></em>);</pre>
<p>
Finishes handling a D-Bus method call by returning <em class="parameter"><code>parameters</code></em>.
If the <em class="parameter"><code>parameters</code></em> GVariant is floating, it is consumed.
</p>
<p>
It is an error if <em class="parameter"><code>parameters</code></em> is not of the right format.
</p>
<p>
This method will free <em class="parameter"><code>invocation</code></em>, you cannot use it afterwards.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parameters</code></em> :</span></p></td>
<td>A <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> tuple with out parameters for the method or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not passing any parameters.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-return-error"></a><h3>g_dbus_method_invocation_return_error ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_method_invocation_return_error
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> code</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Finishes handling a D-Bus method call by returning an error.
</p>
<p>
See <a class="link" href="gio-GDBusError.html#g-dbus-error-encode-gerror" title="g_dbus_error_encode_gerror ()"><code class="function">g_dbus_error_encode_gerror()</code></a> for details about what error name
will be returned on the wire. In a nutshell, if the given error is
registered using <a class="link" href="gio-GDBusError.html#g-dbus-error-register-error" title="g_dbus_error_register_error ()"><code class="function">g_dbus_error_register_error()</code></a> the name given
during registration is used. Otherwise, a name of the form
<code class="literal">org.gtk.GDBus.UnmappedGError.Quark...</code> is
used. This provides transparent mapping of <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> between
applications using GDBus.
</p>
<p>
If you are writing an application intended to be portable,
<span class="emphasis"><em>always</em></span> register errors with <a class="link" href="gio-GDBusError.html#g-dbus-error-register-error" title="g_dbus_error_register_error ()"><code class="function">g_dbus_error_register_error()</code></a>
or use <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-return-dbus-error" title="g_dbus_method_invocation_return_dbus_error ()"><code class="function">g_dbus_method_invocation_return_dbus_error()</code></a>.
</p>
<p>
This method will free <em class="parameter"><code>invocation</code></em>, you cannot use it afterwards.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
<td>A <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> for the <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> error domain.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
<td>The error code.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>printf()-style format.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>Parameters for <em class="parameter"><code>format</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-return-error-valist"></a><h3>g_dbus_method_invocation_return_error_valist ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_method_invocation_return_error_valist
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> code</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
                                                         <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
<p>
Like <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-return-error" title="g_dbus_method_invocation_return_error ()"><code class="function">g_dbus_method_invocation_return_error()</code></a> but intended for
language bindings.
</p>
<p>
This method will free <em class="parameter"><code>invocation</code></em>, you cannot use it afterwards.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
<td>A <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> for the <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> error domain.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
<td>The error code.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
<td>printf()-style format.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
<td>
<span class="type">va_list</span> of parameters for <em class="parameter"><code>format</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-return-error-literal"></a><h3>g_dbus_method_invocation_return_error_literal ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_method_invocation_return_error_literal
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> code</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *message</code></em>);</pre>
<p>
Like <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-return-error" title="g_dbus_method_invocation_return_error ()"><code class="function">g_dbus_method_invocation_return_error()</code></a> but without <code class="function">printf()</code>-style formatting.
</p>
<p>
This method will free <em class="parameter"><code>invocation</code></em>, you cannot use it afterwards.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
<td>A <a href="../glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> for the <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> error domain.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td>
<td>The error code.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td>
<td>The error message.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-return-gerror"></a><h3>g_dbus_method_invocation_return_gerror ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_method_invocation_return_gerror
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre>
<p>
Like <a class="link" href="gio-GDBusMethodInvocation.html#g-dbus-method-invocation-return-error" title="g_dbus_method_invocation_return_error ()"><code class="function">g_dbus_method_invocation_return_error()</code></a> but takes a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>
instead of the error domain, error code and message.
</p>
<p>
This method will free <em class="parameter"><code>invocation</code></em>, you cannot use it afterwards.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="g-dbus-method-invocation-return-dbus-error"></a><h3>g_dbus_method_invocation_return_dbus_error ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_dbus_method_invocation_return_dbus_error
                                                        (<em class="parameter"><code><a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *error_name</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *error_message</code></em>);</pre>
<p>
Finishes handling a D-Bus method call by returning an error.
</p>
<p>
This method will free <em class="parameter"><code>invocation</code></em>, you cannot use it afterwards.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
<td>A <a class="link" href="gio-GDBusMethodInvocation.html#GDBusMethodInvocation" title="GDBusMethodInvocation"><span class="type">GDBusMethodInvocation</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error_name</code></em> :</span></p></td>
<td>A valid D-Bus error name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error_message</code></em> :</span></p></td>
<td>A valid D-Bus error message.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17</div>
</body>
</html>